if (global.control == 1)
{
have_collided = false;
if (actor_floorbelow(1) == false)
{
vsp = min(vsp + (g * (30/room_speed)),16);
}
if (vsp_active != 0)
{
vsp = vsp_active;
vsp_active = 0;
}
if (vsp < -16)
{
vsp = -16;
}
if (is_solid == true)
{
repeat (abs(vsp))
{
if (actor_floorbelow(sign(vsp) * (30/room_speed)) == false)
{
y += sign(vsp) * (30/room_speed);
}
else
{
if (vsp != 0)
{
have_collided = true;
vsp = 0;
}
}
}
repeat (hsp)
{
if (scene_get_collision_map(x+(dir * (30/room_speed)),y) != true)
{
x += dir * (30/room_speed);
}
else
{
have_collided = true;
}
}
}
else
{
repeat (abs(vsp))
{
y += sign(vsp) * (30/room_speed);
if (place_meeting(x,y+sign(vsp) * (30/room_speed),obj_solid) == true) or (place_meeting(x,y+sign(vsp) * (30/room_speed),obj_floor) == true)
{
have_collided = true;
}
}
repeat (hsp)
{
x += dir * (30/room_speed);
if (place_meeting(x+(dir * (30/room_speed)),y,obj_solid) == true)
{
have_collided = true;
}
}
}
}
